package com.wondersgroup.insurance.dnuilearn.beahvior;

import android.os.Bundle;
import android.support.annotation.Nullable;
import android.support.v7.app.AppCompatActivity;
import android.view.MotionEvent;
import android.view.View;

import com.wondersgroup.insurance.dnuilearn.R;

import butterknife.BindView;
import butterknife.ButterKnife;

/**
 * @author 黄赛赛
 * @version V1.0
 * @Title: ${file_name}
 * @Package ${package_name}
 * @Description: ${todo}()
 * @date 2017/7/13 0013 23:13
 */
public class Beahviror1Activity extends AppCompatActivity {
    @BindView(R.id.view1)
    View view1;
    @BindView(R.id.view2)
    View view2;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_behvior1);
        ButterKnife.bind(this);
        view1.setOnTouchListener(new View.OnTouchListener() {
            @Override
            public boolean onTouch(View view, MotionEvent motionEvent) {
                view.setX(motionEvent.getX());
                view.setY(motionEvent.getY());
                return true;
            }
        });
    }
}
